// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "Data/MissionStruct.h"
#include "ClickedQuestWidget.generated.h"

DECLARE_MULTICAST_DELEGATE_OneParam(FTrackProgressCompleted, bool);
UCLASS()
class MISCELLANEOUSPROJECT_API UClickedQuestWidget : public UUserWidget
{
	GENERATED_BODY()
public:
	virtual void NativeConstruct() override;
public:
	UFUNCTION(BlueprintCallable, Category = MissionComponent)
	void UpdateClickedQuest(FMissionMaster MissionInfo);
	UFUNCTION(BlueprintCallable, Category = MissionComponent)
	void CreateObjectivesList();
	UFUNCTION(BlueprintCallable, Category = MissionComponent)
	void CreateRewardsList();
	UFUNCTION(BlueprintCallable, Category = MissionComponent)
	void UpdateQuestInfo();
	UFUNCTION(BlueprintCallable, Category = MissionComponent)
	void UpdateTrackText();
	UFUNCTION(BlueprintCallable, Category = MissionComponent)
	void UpdateVisibility();
	UFUNCTION()
	void OnTrackUpdated(bool Filled);
public:
	UPROPERTY(meta = (BindWidget))
	class UHorizontalBox* BottomInfo;
	UPROPERTY(meta = (BindWidget))
	class USizeBox* ClickedMission;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* MissionTitle;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* MissionDescription;
	UPROPERTY(meta = (BindWidget))
	class UVerticalBox* ObjectiveList;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* Region;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* RecommendedLevel;
	UPROPERTY(meta = (BindWidget))
	class UHorizontalBox* RewardList;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* TrackText;
	class UKeyProgressWidget* Widget_KeyProgress;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ExposeOnSpawn = "true"), Category = "Default")
	TSubclassOf<class USingleObjectiveHintWidget> SingleObjectiveHintWidgetClass;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ExposeOnSpawn = "true"), Category = "Default")
	TSubclassOf<class USingleRewardWidget> SingleRewardWidgetClass;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ExposeOnSpawn = "true"), Category = "Default")
	TSubclassOf<class USingleHintWidget> HintWidgetClass;

	FMissionMaster MissionInfo;
	FTrackProgressCompleted OnTrackProgressCompleted;

};
